package shuai.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import shuai.dao.IUserDao;
import shuai.model.User;
import shuai.service.IUserService;
@Service("userService")
public class UserServiceImpl implements IUserService {
	@Resource
	private IUserDao userDao;
	
	public User selectByPrimaryKey(int userId) {
		return userDao.selectByPrimaryKey(userId);
	}

	
	public List<User> selectAll() {		
		return userDao.selectAll();
	}

	
	public int addUser(User user) {		
		return userDao.addUser(user);
	}

	
	public int delUser(int id) {		
		return userDao.delUser(id);
	}


	public IUserDao getUserDao() {
		return userDao;
	}


	public void setUserDao(IUserDao userDao) {
		this.userDao = userDao;
	}
	
}
